home *** CD-ROM | disk | FTP | other *** search
- /*
- **
- ** Load To Voyager - ARexx script for HTMLEditor
- ** $VER: LoadToVoyager.hrx © Adam 'Sherwood' Zaparcinski
- ** This script saves actually edited file and loads this file to Voyager
- ** Tested with Voyager 1.0 and Voyager 2.88 demo
- **
- */
-
- options results
- address 'HTMLEDIT.1'
-
- /* save edited file */
-
- he_save
-
- /* get name of file (with path) */
-
- he_getfilename
- URL=RESULT
- URL=INSERT("file:///",URL)
-
- /* path to Voyager should be specified as an argument */
- PARSE ARG BROWSERPATH
-
- /* check if Voyager is running and run it if isnt */
- port=VOYAGER
-
- IF ~SHOW('P',port) THEN DO
-
- /* some versions if voyager reports them as MindWalker */
- port=MINDWALKER
- IF ~SHOW('P',port) THEN DO
- ADDRESS COMMAND
- 'RUN >NIL:' BROWSERPATH
- 'SYS:rexxc/WaitForPort' VOYAGER
- port=VOYAGER
- IF RC>0 THEN DO
- 'SYS:rexxc/WaitForPort' MINDWALKER
- port=MINDWALKER
- IF RC>0 THEN DO
- say "No port"
- EXIT 5
- END
- END
- END
- END
-
- /* now load our file to Voyager */
- INTERPRET 'ADDRESS' port
- openURL URL
-
- exit